load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

go_library(
    name = "cockroach-sql_lib",
    srcs = ["main.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/cmd/cockroach-sql",
    visibility = ["//visibility:private"],
    deps = [
        "//pkg/build",
        "//pkg/cli/clicfg",
        "//pkg/cli/clientflags",
        "//pkg/cli/clienturl",
        "//pkg/cli/clierror",
        "//pkg/cli/cliflagcfg",
        "//pkg/cli/cliflags",
        "//pkg/cli/clisqlcfg",
        "//pkg/cli/clisqlclient",
        "//pkg/cli/clisqlexec",
        "//pkg/cli/exit",
        "//pkg/security/clientsecopts",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_spf13_cobra//:cobra",
    ],
)

go_binary(
    name = "cockroach-sql",
    embed = [":cockroach-sql_lib"],
    exec_properties = {"Pool": "large"},
    visibility = ["//visibility:public"],
)
